#ifndef _BST_H_
#define _BST_H_

typedef struct bitree_node_s  bitree_node_t; 
typedef struct bitree_node_s*  bitree_node_ptr;
typedef struct bitree_node_s*  bitree_t;

struct bitree_node_s
{
    int  data;
    struct bitree_node_s *parent;
    struct bitree_node_s *lchild;
    struct bitree_node_s *rchild;
};

bitree_node_ptr new_bitree_node(int data);

int bitree_insert(bitree_t *root, int data);

int bitree_delete(bitree_t *root, int data);

bitree_node_t* get_min_node(bitree_t root);

bitree_node_t* get_max_node(bitree_t root);

void bitree_pre_order_print(bitree_t root);

void bitree_in_order_print(bitree_t root);

void bitree_post_order_print(bitree_t root);

#endif 